﻿<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h4 class="modal-title">@ViewBag.Title</h4>
</div>

@if (ViewBag.Form != null)
{
    if (ViewBag.Form is ModalFormHelpers)
    {
        <text>@{ViewBag.Form.BeginForm(Html);}</text>
    }
    else if (ViewBag.Form is ModalAjaxFormHelpers)
    {
        <text>@{ViewBag.Form.BeginForm(Ajax);}</text>
    }
}

<div class="modal-body">
    @RenderBody()
</div>

<div class="modal-footer">
    @if (ViewBag.DeshabilitarCerrarFooter == null || !ViewBag.DeshabilitarCerrarFooter)
    { 
        <button type="button" class="btn" data-dismiss="modal"> Cerrar</button>
    }    
    @RenderSection("Footer",false)
</div>

@if (ViewBag.Form != null || ViewBag.AjaxForm != null)
{
    Html.EndForm();
}
